import cv2
import numpy as np
from matplotlib import pyplot as plt

img = cv2.imread("d:\\test\\test.jpg")
# plt.imshow(img, cmap='gray', interpolation='bicubic')
# plt.xticks([]), plt.yticks([])  # to hide tick values on X and Y axis
# plt.show()

b, g, r = cv2.split(img)
img2 = cv2.merge([r, g, b])
plt.subplot(121)
plt.imshow(img)  # expects distorted color
plt.subplot(122)
plt.imshow(img2)  # expect true color
plt.xticks([]), plt.yticks([])
plt.show()

# cv2.imshow('bgr image', img)  # expects true color
# cv2.imshow('rgb image', img2)  # expects distorted color
# cv2.waitKey(0)
# cv2.destroyAllWindows()
